+2005-11-16 Michael Natterer <mitch@imendio.com>
+
+ * gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
+ function which destroys the display's event source. Also removes
+ the source from the global display_sources list and unrefs it.
+
+ * gdk/x11/gdkprivate-x11.h: declare the function.
+
+ * gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
+ instead of half-destroying the source here.
+
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
+2005-11-16 Michael Natterer <mitch@imendio.com>
+
+ * gdk/x11/gdkevents-x11.c (_gdk_events_uninit): new internal
+ function which destroys the display's event source. Also removes
+ the source from the global display_sources list and unrefs it.
+
+ * gdk/x11/gdkprivate-x11.h: declare the function.
+
+ * gdk/x11/gdkdisplay-x11.c (gdk_display_x11_dispose): call it
+ instead of half-destroying the source here.
+
2005-11-15 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreestore.c (gtk_tree_store_move): Fix a memory
for (i = 0; i < n_screens; i++)
_gdk_screen_close (display_x11->screens[i]);
- if (display_x11->event_source)
- {
- g_source_destroy (display_x11->event_source);
- display_x11->event_source = NULL;
- }
+ _gdk_events_uninit (GDK_DISPLAY_OBJECT (object));
G_OBJECT_CLASS (parent_class)->dispose (object);
}
NULL);
}
+void
+_gdk_events_uninit (GdkDisplay *display)
+{
+ GdkDisplayX11 *display_x11 = GDK_DISPLAY_X11 (display);
+
+ if (display_x11->event_source)
+ {
+ display_sources = g_list_remove (display_sources,
+ display_x11->event_source);
+ g_source_destroy (display_x11->event_source);
+ g_source_unref (display_x11->event_source);
+ display_x11->event_source = NULL;
+ }
+}
/**
* gdk_events_pending:
void _gdk_x11_events_uninit_screen (GdkScreen *screen);
void _gdk_events_init (GdkDisplay *display);
+void _gdk_events_uninit (GdkDisplay *display);
void _gdk_windowing_window_init (GdkScreen *screen);
void _gdk_visual_init (GdkScreen *screen);
void _gdk_dnd_init (GdkDisplay *display);